package com.woniuxy.mapper;


import com.woniuxy.entity.Goods;
import com.woniuxy.entity.vo.GoodsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GoodsMapper {

    List<GoodsVO> findByCategoryId(int categoryId);

    Goods getDetailByGid (int gid);

    int subStock(@Param("id") int id, @Param("num") int num);

    boolean delById(int id);

    List<Goods> findAll();

    List<Goods> findByMid(int uid);

    boolean update(Goods goods);

    void add(Goods goods);

}
